import { EditorState } from "draft-js";
import { getSelectedBlocksMetadata } from "../libs/draftjs-utils";



export const useCurrentBlockMetaData = (editorState: EditorState) => {
    const blockMetaData = getSelectedBlocksMetadata(editorState);
    return blockMetaData;
}

export const useCurrentBlockMetaDataStyle = (editorState: EditorState, key: string) => {
    const blockMetaData = useCurrentBlockMetaData(editorState)
    return blockMetaData.get(key);
}

